package com.javaweb.constant;

import java.util.regex.Pattern;

public final class PatternConstant {

	/**
	 * 中国车牌号
	 */
	public static final Pattern CAR_NO_PATTERN = Pattern.compile("([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z][a-zA-Z](([DABCEFGHJK]((?![IO])[a-zA-Z0-9](?![IO]))[0-9]{4})|([0-9]{5}[DABCEFGHJK]))|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z][A-Z][A-Z0-9]{4}[A-Z0-9挂学警港澳])");

	/**
	 * 邮箱
	 */
	public static final Pattern EMAIL_PATTERN = Pattern.compile("(\\w)+(\\.\\w+)*@(\\w)+((\\.\\w+)+)");
	
	/**
	 * IP地址
	 */
	public static final Pattern IP_PATTERN = Pattern.compile("((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)");
	
	/**
	 * 中国手机号
	 */
	public static final Pattern PHONE_NO_PATTERN = Pattern.compile("1(3|4|5|6|7|8|9)\\d{9}");
    
	/**
	 * 正数正则
	 */
	public static final Pattern NUMBER_PATTERN = Pattern.compile("[\\d]+[.]?[\\d]*");
    
	/**
	 * 字母正则
	 */
	public static final Pattern LETTER_PATTERN = Pattern.compile("(^[a-zA-Z]*)");
	
	/**
	 * 数字字母正则
	 */
	public static final Pattern NUMBER_LETTER_PATTERN = Pattern.compile("[0-9a-zA-Z]+");
	
	/**
	 * 0的正则
	 */
	public static final Pattern ZERO_PATTERN = Pattern.compile("[+-]?0.?[0]*");
    
}
